home *** CD-ROM | disk | FTP | other *** search
-
- VTIMES(3) UNIX Programmer's Manual VTIMES(3)
-
- NNAAMMEE
- vvttiimmeess - get information about resource utilization
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssyyss//vvttiimmeess..hh>>
-
- vvttiimmeess(_s_t_r_u_c_t _v_t_i_m_e_s _*_p_a_r___v_m, _s_t_r_u_c_t _v_t_i_m_e_s _*_c_h___v_m)
-
- DDEESSCCRRIIPPTTIIOONN
- TThhiiss iinntteerrffaaccee iiss oobbssoolleetteedd bbyy getrusage((22)).. IItt iiss aavvaaiillaabbllee ffrroomm tthhee
- ccoommppaattiibbiilliittyy lliibbrraarryy,, lliibbccoommppaatt..
-
- The vvttiimmeess() function returns accounting information for the current pro-
- cess and for the terminated child processes of the current process. Ei-
- ther _p_a_r___v_m or _c_h___v_m or both may be 0, in which case only the information
- for the pointers which are non-zero is returned.
-
- After the call, each buffer contains information as defined by the con-
- tents of the include file _/_u_s_r_/_i_n_c_l_u_d_e_/_s_y_s_/_v_t_i_m_e_s_._h:
-
- struct vtimes {
- int vm_utime; /* user time (*HZ) */
- int vm_stime; /* system time (*HZ) */
- /* divide next two by utime+stime to get averages */
- unsigned vm_idsrss; /* integral of d+s rss */
- unsigned vm_ixrss; /* integral of text rss */
- int vm_maxrss; /* maximum rss */
- int vm_majflt; /* major page faults */
- int vm_minflt; /* minor page faults */
- int vm_nswap; /* number of swaps */
- int vm_inblk; /* block reads */
- int vm_oublk; /* block writes */
- };
-
- The _v_m___u_t_i_m_e and _v_m___s_t_i_m_e fields give the user and system time respec-
- tively in 60ths of a second (or 50ths if that is the frequency of wall
- current in your locality.) The _v_m___i_d_r_s_s and _v_m___i_x_r_s_s measure memory us-
- age. They are computed by integrating the number of memory pages in use
- each over CPU time. They are reported as though computed discretely,
- adding the current memory usage (in 512 byte pages) each time the clock
- ticks. If a process used 5 core pages over 1 cpu-second for its data and
- stack, then _v_m___i_d_s_r_s_s would have the value 5*60, where _v_m___u_t_i_m_e_+_v_m___s_t_i_m_e
- would be the 60. The _V_m___i_d_s_r_s_s argument integrates data and stack seg-
- ment usage, while _v_m___i_x_r_s_s integrates text segment usage. The _V_m___m_a_x_r_s_s
- function reports the maximum instantaneous sum of the text+data+stack
- core-resident page count.
-
- The _v_m___m_a_j_f_l_t field gives the number of page faults which resulted in
- disk activity; the _v_m___m_i_n_f_l_t field gives the number of page faults in-
- curred in simulation of reference bits; _v_m___n_s_w_a_p is the number of swaps
- which occurred. The number of file system input/output events are re-
- ported in _v_m___i_n_b_l_k and _v_m___o_u_b_l_k These numbers account only for real I/O;
- data supplied by the caching mechanism is charged only to the first pro-
- cess to read or write the data.
-
- SSEEEE AALLSSOO
- time(2), wait3(2), getrusage(2)
-
- HHIISSTTOORRYY
- The vvlliimmiitt() function appeared in 4.2BSD.
-
- 4th Berkeley Distribution June 4, 1993 1
-